package cn.doourbest;

import org.apache.catalina.LifecycleException;
import org.apache.catalina.startup.Tomcat;


public class TomcatMain
{
    public static void main( String[] args ) throws LifecycleException {

        Tomcat tomcat = new Tomcat();
        tomcat.setPort(8083);
        tomcat.addWebapp("","E:\\intellijideaworkspaces\\tocmat-main");
        //tomcat.getConnector();  tomcat 9.0.35(应该是9.0以上都要加这行代码 来监听端口)
        tomcat.start();
        tomcat.getServer().await();
    }
}
